<%@page import="java.util.List"%>
<%@page import="search.OrderSearchData"%>
<%@page import="java.util.Locale"%>
<%@page import="java.text.NumberFormat"%>
<%@page import="models.OrderModel"%>
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.ArrayList"%>
<%
	int totalGroupDeal = (Integer)request.getAttribute("totalGroupDeal");
	int totalDealQuantity = (Integer)request.getAttribute("totalDealQuantity");
	int totalOrderDelivery = (Integer)request.getAttribute("totalOrderDelivery");
	int totalOrderCheckOut = (Integer)request.getAttribute("totalOrderCheckOut");
	int totalOrderMoney = (Integer)request.getAttribute("totalOrderMoney");
	int totalRealMoney = (Integer)request.getAttribute("totalRealMoney");
	String fromDate = "";
	String toDate = "";	
	if(request.getAttribute("fromDate")!=null&&!request.getAttribute("fromDate").toString().isEmpty()){
		fromDate = (String)request.getAttribute("fromDate");		
	}
	if(request.getAttribute("toDate")!=null&&!request.getAttribute("toDate").toString().isEmpty()){
		toDate = (String)request.getAttribute("toDate");		
	}

	NumberFormat nf = NumberFormat.getNumberInstance(Locale.GERMAN);
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Báo Cáo Doanh Số <%=(fromDate!=null&&!fromDate.isEmpty())?"Từ Ngày "+fromDate:""%><%=(toDate!=null&&!toDate.isEmpty())?" Đến Ngày "+toDate:""%></title>
<link rel="stylesheet" type="text/css" href="/css/simple-style.css" />
</head>
<body>
     <div class="simpleStyle">
    	<table cellpadding="0" cellspacing="0" class="simpleTable">
        	<thead>
            	<tr>
                	<th>Tổng Deal</th>
                    <th>Số lượng đăng ký</th>
                    <th>Số lượng đã giao</th>
                    <th>Số lượng đã thanh toán</th>
                    <th>Tổng giá trị đã đăng ký</th>
                    <th>Tổng giá trị đã thanh toán</th>                    
                </tr>
            </thead>
            <tbody>
            	<tr>	                        	
					<td class="center"><%=nf.format(totalGroupDeal) %></td>
                    <td class="center"><%=nf.format(totalDealQuantity) %></td>
                    <td class="center"><%=nf.format(totalOrderDelivery) %></td>
                   	<td class="center"><%=nf.format(totalOrderCheckOut) %></td>
                    <td class="center"><%=nf.format(totalOrderMoney) %></td>
                    <td class="center"><%=nf.format(totalRealMoney) %></td>	                           	                           
                </tr>
            </tbody>
        </table>
    </div>     
</body>
</html>